<template>
    <el-tabs v-model="activeName" @tab-click="tabClick" class="tabs">
      <el-tab-pane :label="$t('configLazyLoad.emailNotify.enterpriseEmailSettings')"
                   name="enterpriseMail">
      </el-tab-pane>
      <el-tab-pane :label="$t('configLazyLoad.emailNotify.notificationMailTemplate')"
                   name="mailTemplate">
      </el-tab-pane>
      <router-view>
      </router-view>
    </el-tabs>
</template>
<script>
  export default {
    name: 'callMain',
    data () {
      return {
        activeName: 'enterpriseMail'
      }
    },
    methods: {
      tabClick({name}) {
        this.$router.push('/index/newConfig/emailNotify/' + name)
      }
    },
    activated () {
      let active  = this.$route.path.split('/').pop()
      if (active === 'mailTemplate' || active === 'enterpriseMail') {
        this.activeName = active
      }
      this.tabClick({name: this.activeName})
    },
    components: {
    },
    beforeMount () {
    },
    computed: {
    },
    mounted () {
    }
  }
</script>
<style lang="stylus" scoped>
  .tabs
    padding 0 15px
    box-sizing border-box
</style>